import Axios from '../utils/axios'
import api from '../api/index'

// 获取所有数据
function getAllNotice() {
  return Axios.get(api.announcement.getAllNotice)
}

// 获取所有数据
function getNoticeById(username: string, password: string) {
    console.log(username, password);
    return Axios.post(api.announcement.getAllNotice, { "user": username, "pwd": password })
  }

  // 获取所有数据
function deleteNoticeById(username: string, password: string) {
    console.log(username, password);
    return Axios.post(api.announcement.getAllNotice, { "user": username, "pwd": password })
  }

  // 获取所有数据
function addNotice(username: string, password: string) {
    console.log(username, password);
    return Axios.post(api.announcement.getAllNotice, { "user": username, "pwd": password })
  }

  // 获取所有数据
function updateNotice(username: string, password: string) {
    console.log(username, password);
    return Axios.post(api.announcement.getAllNotice, { "user": username, "pwd": password })
  }


export default {
    getAllNotice,
    getNoticeById,
    deleteNoticeById,
    addNotice,
    updateNotice
}
